unit uForm1; 

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  StdCtrls;

type

  { TfrmForm1 }

  TfrmForm1 = class(TForm)
    Button1: TButton;
    lblForm1: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end; 

var
  frmForm1: TfrmForm1;

implementation

uses
  uExemplo;

{$R *.lfm}

{ TfrmForm1 }

procedure TfrmForm1.FormActivate(Sender: TObject);
begin
  ShowMessage('Active!');
end;

procedure TfrmForm1.Button1Click(Sender: TObject);
begin
  ShowMessage('OK!');

  frmExemplo.pcExemplo.CloseCurrentPageForm;
end;

end.

